package com.atguigu.gmallsugar.service;

import com.atguigu.gmallsugar.mapper.ProductMapper;
import com.atguigu.gmallsugar.mapper.VisitorStatsMapper;
import com.atguigu.gmallsugar.pojo.SpuStats;
import com.atguigu.gmallsugar.pojo.VisitStats;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

@Service
public class ProductStatsServiceImpl implements ProductStatsService{
    @Autowired
    ProductMapper mapper;


    @Override
    public BigDecimal getGMVFromCK(int date) {
        return mapper.getGMVFromCK(date);
    }

    @Override
    public List<SpuStats> getGMVBySpu(int date, int limit) {
        return mapper.getGMVBySpu(date,limit);
    }


}
